package paproject.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;
import paproject.bean.Mv;
import paproject.service.MvService;

import java.util.List;

@Service
public class MvServiceImpl implements MvService {

    @Autowired
    private paproject.dao.mvDao mvDao;

    @Override
    public void save(Mv mv) {
        this.mvDao.save(mv);
    }

    @Override
    public List<Mv> findAll(Mv mv) {
        //声明查询条件
        Example<Mv> example = Example.of(mv);
        //根据查询条件查询数据
        List<Mv> list = this.mvDao.findAll(example);
        return list;
    }
}
